home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / CUCD / Graphics / Ghostscript / batch / pdf2dsc < prev    next >
Text File  |  1997-04-12  |  394b  |  25 lines

  1. #! /bin/sh
  2.  
  3. # psf2dsc: generates an index of a PDF file.
  4. #
  5. # Yves Arrouye <arrouye@debian.org>, 1996.
  6.  
  7. me=`basename $0`
  8.  
  9. usage() {
  10.     >&2 echo usage: $me "pdffile [ dscfile ]"
  11.     exit 1
  12. }
  13.  
  14. if [ $# -gt 2 ]
  15. then
  16.     usage
  17. fi
  18.  
  19. pdffile=$1
  20. dscfile=$2
  21. : ${dscfile:=`echo $pdffile | sed 's,\.[^/.]*,,'`.dsc}
  22.  
  23. exec gs -q -dNODISPLAY \
  24.     -sPDFname="$pdffile" -sDSCname="$dscfile" pdf2dsc.ps -c quit
  25.